<template>
  <el-menu
    :style="{ width: '230px' }"
    active-text-color="#ffd04b"
    background-color="#545c64"
    class="aside-container"
    default-active="2"
    text-color="#fff"
    @open="handleOpen"
    @close="handleClose"
  >
    <p class="logo-lg">DIDI陪诊</p>
    <TreeMenu :menuData="menuData" :index="1" />
  </el-menu>
</template>

<script setup>
import { reactive } from 'vue'
import { useRouter } from 'vue-router'
import TreeMenu from '../components/treeMenu.vue'

// 获取路由信息数据并传递给组件
const router = useRouter()
const menuData = reactive(router.options.routes[0].children)

const handleOpen = () => {}
const handleClose = () => {}
</script>

<style lang='less' scoped>
.aside-container {
  height: 100%;
  .logo-lg{
    font-size: 20px;
    text-align: center;
    height: 50px;
    line-height: 50px;
    color: #fff;
  }
}
</style>
